import layoutHeaderAside from '@/layout/header-aside'

// 由于懒加载页面太多的话会造成webpack热更新太慢，所以开发环境不使用懒加载，只有生产环境使用懒加载
const _import = require('@/libs/util.import.' + process.env.NODE_ENV)

const meta = { auth: true }

export default {
  path: '/webui',
  name: 'webui',
  meta,
  redirect: { name: 'main' },
  component: layoutHeaderAside,
  children: [
    {
      path: 'index',
      name: 'nanoka-index',
      component: _import('nanoka/index'),
      meta: { ...meta, title: '简介' }
    },
    {
      path: 'main',
      name: 'nanoka-main',
      component: _import('nanoka/main'),
      meta: { ...meta, title: '器件统计' }
    },
    {
      path: 'main2',
      name: 'nanoka-main2',
      component: _import('nanoka/main2'),
      meta: { ...meta, title: '器件操作' }
    },
    {
      path: 'main3',
      name: 'nanoka-main3',
      component: _import('nanoka/main3'),
      meta: { ...meta, title: '器件检索' }
    }
  ]
}
